package com.wl.mr.group;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Partitioner;

public class GroupPartitioner extends Partitioner<GroupBean, NullWritable> {
    @Override
    public int getPartition(GroupBean groupBean, NullWritable nullWritable, int numPartitions) {
        return (groupBean.getOrderId().hashCode() & Integer.MAX_VALUE) % numPartitions;
    }
}
